import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { SysComponent } from './sys.component';

const routes: Routes = [
    {
        path: '',
        component: SysComponent,
        children: [
            {
                path: 'user', loadChildren: './user/user.module#UserModule',
                data: { title: '用户管理', module: 'ptpmc/sys/user', power: 'SHOW' }
            },
            {
                path: 'menu', loadChildren: './menu/menu.module#MenuModule'
                , data: { title: '菜单管理', module: 'ptpmc/sys/menu', power: 'SHOW' }
            },
            {
                path: 'role', loadChildren: './role/role.module#RoleModule',
                data: { title: '角色管理', module: 'ptpmc/sys/role', power: 'SHOW' }
            },
        ]
    },
];

@NgModule({
    imports: [RouterModule.forChild(routes)],
    exports: [RouterModule]
})
export class SysRoutingModule { }
